<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改密码</title>
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/easyui/easyui.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/easyui/color.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/easyui/icon.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/form.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/bee.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/tips.css'}">
<style type="text/css">
	.combo{
		margin-left:20px;
		border-radius: 0px;
		height:28px !important;
	}
	.textbox-icon{
		height:28px !important;
	}
	.textbox-text{
		vertical-align: middle !important;
	}
	.caseinput{
		margin-top:10px
	}
	.form-control{
		height: 16px;
		
	}
	.word{
		font-size: 18px;
		width:90px;
	}
	img{
		cursor:pointer;
	}
</style>
</head>
<body class="zitifont">
	<div class="col-xs-12">
		<form method="post" id="form_line">
		<input type="hidden" id="operatorid" name="operatorid" value="${operid}">
		#{authenticityToken /}
		<div class="col-xs-12" style="min-height:150px">
			<div class="col-xs-11">
				<span class="col-xs-12" style="font-size:22px;width:90px;color:#6197cc;margin-left: 10px;">重置密码</span>
				<div class="col-xs-12" style="margin-top:10px;padding-top:10px;margin-left: 40px;">
					<div class="col-xs-12 caseinput">
						<span class="word"><span style="color: red;">*</span>新密码</span>
						<input  type="password" class="form-control" name="password" id="password" style="width:50%"/>
					</div>
					<div class="col-xs-12 caseinput">
						<span class="word"><span style="color: red;">*</span>确认密码</span>
						<input  type="password" class="form-control" name="confimpassword" id="confimpassword" style="width:50%"/>
					</div>
				</div>
			</div>
		</div>
		<div class="col-xs-6" style="float:right;margin-top:5px;">
			<!-- <input type="image" src="@{'/public/images/button_sync_normal.png'}" id="submitBut"/> -->
			<img src="@{'/public/images/button_save_normal.png'}" id="submitBut">
			<img src="@{'/public/images/button_reset_normal.png'}" onclick="colseDlg()">
		</div>
		</form>
	</div>
</body>
<script type="text/javascript" src="@{'/public/javascripts/layout/jquery-1.8.2.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/jquery.easyui.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/easyui-lang-zh_CN.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/Validator.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/common.js'}"></script>
<script type="text/javascript">
var $Path='${ctxPath}';
function colseDlg(){
	parent.$("#dlg").window("close");
}
$(function(){
	$("#submitBut").click(function(){
		if($("#password").val()==''){
			parent.$.messager.alert('失败',"密码不可为空",'error');
			return false;
		}
		if($("#password").val().length<4){
			parent.$.messager.alert('失败',"密码长度不可小于4位",'error');
			return false;
		}
		if($("#password").val()!=$("#confimpassword").val()){
			parent.$.messager.alert('失败',"两次输入的密码不一致",'error');
			return false;
		}
		var auth=window.parent.getAuth();
		$.ajax({
			type:'post',
			url:$Path+'/admin/operator/resetPassword',
			data:{operatorid:$("#operatorid").val(),password:$("#password").val(),confimpassword:$("#confimpassword").val(),authenticityToken:auth},
			success:function(data){
				if(data.code==200){
					parent.$.messager.alert('成功','重置成功','info',function(){
		        		parent.$('#dlg').window('close');
		        		window.parent.refreshTab("用户管理");
		        	});
				}else{
					parent.$.messager.alert('失败',data.msg,'error');
				}
			},error:function(){
				parent.$.messager.alert('失败',"服务器开小差了~",'error');
			}
		})
		
	})
})
</script>
</html>